//
//  MYXCusGuideController.m
//  meiyinxiang
//
//  Created by 媒印象 on 13/12/2017.
//  Copyright © 2017 hbjApple. All rights reserved.
//

#import "MYXCusGuideController.h"
#import <HexColor.h>
@interface MYXCusGuideController ()
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;

@end

@implementation MYXCusGuideController
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self changeNavColor];

    //self.navigationController.navigationBarHidden = YES;
}
- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self backNavColor];

}
//- (void)viewDidDisappear:(BOOL)animated{
//    [super viewDidDisappear:animated];
//    //self.navigationController.navigationBarHidden = YES;
//    [self backNavColor];
//}
- (void)viewDidLoad {
    [super viewDidLoad];
  //  self.title = @"用户指南";
    // Do any additional setup after loading the view from its nib.
    
}
- (void)awakeFromNib{
    [super awakeFromNib];
    [self addGuideImg];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
+ (MYXCusGuideController *)loadMYXGusVC{
    UINib *nib = [UINib nibWithNibName:@"MYXCusGuideController" bundle:[NSBundle mainBundle]];
    return [[nib instantiateWithOwner:nil options:nil] lastObject];
}

- (void)changeNavColor{
        UIColor *navColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"helpNavColor"]];
        [self.navigationController.navigationBar setBarTintColor:navColor];
}
- (void)backNavColor{
     [self.navigationController.navigationBar setBarTintColor:MYYheadColor];
}
- (void)addGuideImg{
    UIImageView *guideImgView = [[UIImageView alloc] init];
    guideImgView.image = [UIImage imageNamed:self.imgurl];
    CGFloat imgHeight = guideImgView.image.size.height/2;
    guideImgView.frame = CGRectMake(0, 0, ScreenWidth, imgHeight);
    self.scrollView.contentSize = CGSizeMake(ScreenWidth, imgHeight);
    [self.scrollView addSubview:guideImgView];
    
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
